package com.melo;

import lombok.Data;

/**
 * @author lichunlong lcl253137@alibaba-inc.com
 * @desc 普利姆算法: 村庄实体类
 * @date 2025-05-19
 */
@Data
public class PrimVillageGraph {

    /**
     * 村庄图的顶点个数
     */
    private int vertexSize;

    /**
     * 村庄修路途径的顶点集合
     */
    private char[] vertexArr;

    /**
     * 存放边，就是我们的邻接矩阵: 两个点确定一条边, 权值表示距离
     */
    private int[][] weightArr;

    public PrimVillageGraph(int vertexSize) {
        this.vertexSize = vertexSize;
        vertexArr = new char[vertexSize];
        weightArr = new int[vertexSize][vertexSize];
    }
}
